/* SysUserEntity - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package net.da.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import net.da.core.entity.GroupEntity;
import net.da.core.entity.SysUserEntity;

@NamedQuery (name="SysUserImpl.findUserForLogin",
        query="SELECT user " +
            "FROM SysUserEntity user " +
            "WHERE user.name = :userName AND " +
            "user.password = :password")

@Entity
@Table(name = "users")
public class SysUserEntity extends PersistentObjectEntity {

    @Column(name="name", nullable=false)
    private String name;

    @Column(name="password", nullable=false)
    private String password;

    private String description;

    @ManyToOne
    @JoinColumn(name = "group_id")
    private GroupEntity group;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setGroup(GroupEntity group) {
        this.group = group;
    }

    public GroupEntity getGroup() {
        return group;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

}
